﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UeyesAIS.DataDefinition
{
    /// <summary>
    /// 单图检测结果
    /// </summary>
    public class ResultDisplayRowResult : BaseItemResult
    {
        private List<int> _c, _v, _d, _t, _r;
        /// <summary>
        /// 检测图像
        /// </summary>
        public Bitmap InspedImg { get; set; }

        /// <summary>
        /// 缺陷行
        /// </summary>
        public List<int> ErrRow
        {
            get { return _r ?? (_r = new List<int>()); }
            set { _r = value; }
        }
        /// <summary>
        /// 缺陷列
        /// </summary>
        public List<int> ErrCol
        {
            get { return _c ?? (_c = new List<int>()); }
            set { _c = value; }
        }
        /// <summary>
        /// 缺陷NG类型
        /// </summary>
        public List<int> ErrType
        {
            get { return _t ?? (_t = new List<int>()); }
            set { _t = value; }
        }
        /// <summary>
        /// 缺陷NG面积
        /// </summary>
        public List<int> ErrValue
        {
            get { return _v ?? (_v = new List<int>()); }
            set { _v = value; }
        }
        /// <summary>
        /// 缺陷NG变异度
        /// </summary>
        public List<int> ErrDiff
        {
            get { return _d ?? (_d = new List<int>()); }
            set { _d = value; }
        }
        /// <summary>
        /// 检测项索引
        /// </summary>
        public int Index { get; set; }
        /// <summary>
        /// 图形来源
        /// </summary>
        public string SourceName { get; set; }

        ~ResultDisplayRowResult()
        {
            if (InspedImg != null)
            {
                InspedImg.Dispose();
            }
        }
    }
}
